package com.health.mapp.impl;

import com.health.db.model.GoodsDrugListExample;
import com.health.db.service.order.IGoodsDrugListService;
import com.health.db.service.order.IRegisterOrderService;
import com.health.mapp.bean.Header;
import com.health.mapp.bean.QueryGoodsDrugListReq;
import com.health.mapp.bean.QueryGoodsDrugListResp;
import com.health.mapp.utils.Response;

/**
 *  订单查询类
 * @author HiRoad
 *
 */
public class QueryGoodsDrugListImpl implements ActionInterface {
	
	private IGoodsDrugListService goodsDrugListService  ;
	
	@Override
	public Response execute(Header header, Object reqBean) throws Exception {
		
		QueryGoodsDrugListReq req=(QueryGoodsDrugListReq) reqBean;
		QueryGoodsDrugListResp _resp= new QueryGoodsDrugListResp();
		
		GoodsDrugListExample temp = new GoodsDrugListExample();
		
		Integer pageNo=req.getPageNo();
		Integer pageSize=req.getPageNum();
		
		if(null!=pageNo&&null!=pageSize){
			temp.setOffset((pageNo.intValue()-1)*pageSize.intValue());
			temp.setPageSize(pageSize.intValue());
		}
		_resp.setGoodsDrugList(goodsDrugListService.selectByExample(temp));
 
		return _resp;
	}

	public IGoodsDrugListService getGoodsDrugListService() {
		return goodsDrugListService;
	}

	public void setGoodsDrugListService(IGoodsDrugListService goodsDrugListService) {
		this.goodsDrugListService = goodsDrugListService;
	}

	
	
	

}
